\name{pRRopheticCV}
\alias{pRRopheticCV}
\title{This function uses X fold cross validation on the TrainingSet to estimate the accuracy of the
phenotype prediction fold: How many fold cross-validation to use.}
\usage{
pRRopheticCV(drug, tissueType = "all", testExprData = NULL, cvFold = -1,
  powerTransformPhenotype = TRUE, batchCorrect = "eb",
  removeLowVaryingGenes = 0.2, minNumSamples = 10, selection = 1)
}
\arguments{
  \item{testExprData}{The test data where the phenotype
  will be estimted. It is a matrix of expression levels,
  rows contain genes and columns contain samples,
  "rownames()" must be specified and must contain the same
  type of gene ids as "trainingExprData".}

  \item{drug}{the name of the drug for which you would like
  to predict sensitivity, one of A.443654, A.770041,
  ABT.263, ABT.888, AG.014699, AICAR, AKT.inhibitor.VIII,
  AMG.706, AP.24534, AS601245, ATRA, AUY922, Axitinib,
  AZ628, AZD.0530, AZD.2281, AZD6244, AZD6482, AZD7762,
  AZD8055, BAY.61.3606, Bexarotene, BI.2536, BIBW2992,
  Bicalutamide, BI.D1870, BIRB.0796, Bleomycin, BMS.509744,
  BMS.536924, BMS.708163, BMS.754807, Bortezomib,
  Bosutinib, Bryostatin.1, BX.795, Camptothecin, CCT007093,
  CCT018159, CEP.701, CGP.082996, CGP.60474, CHIR.99021,
  CI.1040, Cisplatin, CMK, Cyclopamine, Cytarabine,
  Dasatinib, DMOG, Docetaxel, Doxorubicin, EHT.1864,
  Elesclomol, Embelin, Epothilone.B, Erlotinib, Etoposide,
  FH535, FTI.277, GDC.0449, GDC0941, Gefitinib,
  Gemcitabine, GNF.2, GSK269962A, GSK.650394, GW.441756,
  GW843682X, Imatinib, IPA.3, JNJ.26854165, JNK.9L,
  JNK.Inhibitor.VIII, JW.7.52.1, KIN001.135, KU.55933,
  Lapatinib, Lenalidomide, LFM.A13, Metformin,
  Methotrexate, MG.132, Midostaurin, Mitomycin.C, MK.2206,
  MS.275, Nilotinib, NSC.87877, NU.7441, Nutlin.3a,
  NVP.BEZ235, NVP.TAE684, Obatoclax.Mesylate, OSI.906,
  PAC.1, Paclitaxel, Parthenolide, Pazopanib, PD.0325901,
  PD.0332991, PD.173074, PF.02341066, PF.4708671,
  PF.562271, PHA.665752, PLX4720, Pyrimethamine, QS11,
  Rapamycin, RDEA119, RO.3306, Roscovitine, Salubrinal,
  SB.216763, SB590885, Shikonin, SL.0101.1, Sorafenib,
  S.Trityl.L.cysteine, Sunitinib, Temsirolimus,
  Thapsigargin, Tipifarnib, TW.37, Vinblastine,
  Vinorelbine, Vorinostat, VX.680, VX.702, WH.4.023,
  WO2009093972, WZ.1.84, X17.AAG, X681640, XMD8.85,
  Z.LLNle.CHO, ZM.447439.}

  \item{cvFold}{Specify the "fold" requried for cross
  validation. "-1" will do leave one out cross validation
  (LOOCV)}

  \item{powerTransformPhenotype}{Should the phenotype be
  power transformed before we fit the regression model?
  Default to TRUE, set to FALSE if the phenotype is already
  known to be highly normal.}

  \item{batchCorrect}{How should training and test data
  matrices be homogenized. Choices are "eb" (default) for
  ComBat, "qn" for quantiles normalization or "none" for no
  homogenization.}

  \item{removeLowVaryingGenes}{What proportion of low
  varying genes should be removed? 20 percent by default.}

  \item{minNumSamples}{How many training and test samples
  are requried. Print an error if below this threshold}

  \item{selection}{How should duplicate gene ids be
  handled. Default is -1 which asks the user. 1 to
  summarize by their or 2 to disguard all duplicates.}

  \item{printOutput}{Set to FALSE to supress output}
}
\value{
An object of class "pRRopheticCv", which is a list with two
members, "cvPtype" and "realPtype", which correspond to the
cross valiation predicted phenotype and the user provided
measured phenotype respectively.
}
\description{
This function does cross validation on a training set to
estimate prediction accuracy on a training set. If the
actual test set is provided, the two datasets can be
subsetted and homogenized before the cross validation
analysis is preformed. This may improve the estimate of
prediction accuracy.
}
\keyword{phenotype}
\keyword{predict,}

